import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import AutoImport from 'unplugin-auto-import/vite'
 
export default defineConfig({
    plugins: [
        uni(),        
        // 自动导入配置
        AutoImport({
            imports:[
                // 预设
                'vue',
                'uni-app'                
            ]
        }),
    ],
    css: {//防止每次引入scss文件都写@import "@/uni.scss"; // 引入全局变量
        preprocessorOptions: {
            scss: {
                additionalData: `@import "@/uni.scss";`
            }
        }
    }
})

